package com.example.android.commitcontent.ime.cores.utils;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.example.android.commitcontent.ime.R;

public class ToastHelper {
    public static void show(Context context, Object o) {
        Toast toast = new Toast(context);
        View layout = LayoutInflater.from(context).inflate(R.layout.layout_toast, null);
        TextView textView = (TextView) layout.findViewById(R.id.tv_title);
        textView.setText(o.toString());
        toast.setView(layout);
        toast.show();
    }
}
